package cn.lcfms.test;


import java.io.IOException;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import cn.lcfms.app.admin.service.DataService;
import cn.lcfms.utils.HttpUtils;

@RunWith(SpringJUnit4ClassRunner.class)    
@ContextConfiguration(locations = {"classpath*:springmvc-context.xml"}) 
public class T5{
	
	@Autowired
	private DataService ds;
	
	@Test
	public void t1(){						
		ds.getArticleList(1,9,1);
	}
	
	public static void main(String[] args) throws IOException {
		String getdata = HttpUtils.getdata("http://www.win4000.com/");
		Document doc = Jsoup.parse(getdata);
		Elements e = doc.select("html");
		String html = e.html();
		System.out.println(html);
	}
}
